99c2e114f047bab7072badf6448f9c0c05d90f61,javasrc/src/org/ccnx/ccn/utils/ccnlsrepo.java,ccnlsrepo,init,#String[]#,90

Before Change


			} else if (args[i].equals("-timeout")) {
				if (cflag) {
					System.err.println("please use either the -timeout or -c flags, not both");
					usage();
					System.exit(1);
				}
				tflag = true;

After Change


		// first look for prefix and timeout in the args list
		boolean tflag = false;
		boolean cflag = false;
		String extraUsage = "";

		for (int i = 0; i < args.length; i++) {
			if (i == 0 && args[0].startsWith("[")) {
				extraUsage = args[0];
				continue;
			}
			if (args[i].equals("-h")) {
				usage(extraUsage);
				System.exit(0);
			}
			if (!args[i].equals("-timeout") && !args[i].equals("-c") && !args[i].equals("-continuous")) {
				prefix = args[i];
			} else if (args[i].equals("-timeout")) {
				if (cflag) {
					System.err.println("please use either the -timeout or -c flags, not both");
					usage(extraUsage);
					System.exit(1);
				}
				tflag = true;
				i++;
				if (i >= args.length) {
					usage(extraUsage);
					System.exit(1);
				} else {
					try {
						timeout = Long.parseLong(args[i]);
					} catch (Exception e) {
						System.err.println("Could not parse timeout.  Please check and retry.");
						usage(extraUsage);
						System.exit(1);
					}

				}
			} else if (args[i].equals("-c") || args[i].equals("-continuous")) {
				cflag = true;
				if (tflag) {
					System.err.println("please use either the -timeout or -c flags, not both");
					usage(extraUsage);
					System.exit(1);
				}
				timeout = 0;